package com.ruoyi.project.distribute.controller;


import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.distribute.domain.HosDocumentmsg;
import com.ruoyi.project.distribute.domain.HosDrug;
import com.ruoyi.project.distribute.service.IHosRepertoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author anran
 */
@RestController
@RequestMapping("/distribute/repertory")
public class HosRepertoryController extends BaseController
{
    @Autowired
    private IHosRepertoryService hosRepertoryService;

    /**
     * 查询生产厂家信息
     */
    @GetMapping("/list")
    @PreAuthorize("@ss.hasPermi('distribute:repertory:list')")
    public TableDataInfo list(HosDrug hosDrug)
    {
        startPage();
        List<HosDrug> list = hosRepertoryService.selectHosDrugList(hosDrug);
        return getDataTable(list);
    }

    /**
     * 查询生产厂家信息
     */
    @GetMapping("/getList")
    @PreAuthorize("@ss.hasPermi('distribute:repertory:list')")
    public TableDataInfo getList(HosDocumentmsg hosDocumentmsg)
    {
        startPage();
        List<HosDocumentmsg> list = hosRepertoryService.selectRepertoryList(hosDocumentmsg);
        System.out.println(list);
        return getDataTable(list);
    }


}
